#include "matlab_interface.hpp"

#include "myFFT2.h"

std::vector<cpp_plugin::interface_t *> *get_cpp_plugin_instance_lists(void) {
    auto *rtv = new std::vector<cpp_plugin::interface_t *>();
    try {
        rtv->push_back(new matlab_interface_t(
                myFFT2Initialize, myFFT2Terminate, myFFT2, "myfft2", "对图片做傅里叶变换"));
    }
    catch (const std::exception &e) {
        std::cerr << e.what() << std::endl;
        rtv->clear();
    }
    return rtv;
}


void get_cpp_plugin_instance_deletor(std::vector<cpp_plugin::interface_t *> *instance) {
    for (auto &i: *instance) {
        delete i;
    }
    delete instance;
}